
<div class="titlebar">
    <div class="fn-left"><i class="iconfont icon-line-chart_icon"></i>账单统计</div>
    <div class="fn-right">
    <form class="input-group" id="form" action="{:url('bank/index')}" method="get">
        <input placeholder="开始时间" class="input w100 ui-date" type="text" name="starttime" value="{$starttime}" autocomplete="off"/>
        <input placeholder="结束时间" class="input w100 ui-date" type="text" name="endtime" value="{$endtime}" autocomplete="off"/>
        <input type="submit" value="搜索" class="button button-blue" />
    </div>
    </form>
    <div class="fn-right button-group">
        <a href="{:url('bank/index',['time' => 1])}" class="button{$time==1?' button-violet':''}">今日</a>
        <a href="{:url('bank/index',['time' => 2])}" class="button{$time==2?' button-violet':''}">昨日</a>
        <a href="{:url('bank/index',['time' => 30])}" class="button{$time==30?' button-violet':''}">本月</a>
        <a href="{:url('bank/index',['time' => 60])}" class="button{$time==60?' button-violet':''}">上月</a>
    </div>
</div>
<div class="cards">
    <div class="card{$time || $starttime || $endtime?' violet':''}">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$receipts}</div><div class="text">流水入账</div></div>
    </div>
    <div class="card{$time || $starttime || $endtime?' violet':''}">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$expenses}</div><div class="text">流水出账</div></div>
    </div>
    <div class="card{$types || $keyword?' violet':''}">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$income/100|money}</div><div class="text">累计收益<span class="gray fn-f12">[不包含分账]</span></div></div>
    </div>
    <div class="card{$types || $keyword?' violet':''}">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$money/100|money}</div><div class="text">帐号余额<span class="gray fn-f12">[不包含分账]</span></div></div>
    </div>
    <div class="card{$types || $keyword?' violet':''}">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$points}</div><div class="text">帐号积分</div></div>
    </div>
</div>
<div class="titlebar">
    <div class="fn-left"><i class="iconfont icon-chuzhijine"></i>账户管理</div>
    <div class="fn-right">
        <form action="{:url('bank/index')}" method="get">
            <input placeholder="用户手机号或昵称" class="input w200" type="text" name="keyword" value="{$keyword}" />
            <input type="submit" value="搜索" class="button button-blue" />
        </form>
    </div>
    <div class="fn-right">
        <a href="{:url('bank/index',['types'=>0])}" class="button{if $types == 0} button-green{/if}">最近交易</a>
        <a href="{:url('bank/index',['types'=>1])}" class="button{if $types == 1} button-green{/if}">收益排行</a>
        <a href="{:url('bank/index',['types'=>2])}" class="button{if $types == 2} button-green{/if}">余额排行</a>
        <a href="{:url('bank/index',['types'=>3])}" class="button{if $types == 3} button-green{/if}">锁定排行</a>
        <a href="{:url('bank/index',['types'=>4])}" class="button{if $types == 4} button-green{/if}">积分排行</a>
    </div>
</div>
<table class="pure-table">
    <thead>
        <tr>
            <th class="w100 fn-tac">账单</th>
            <th>微信昵称</th>
            <th class="w120">绑定手机</th>
            <th class="w160 fn-tar{if $types == 1} red fn-fb{/if}">累计收益(￥)</th>
            <th class="w160 fn-tar{if $types == 2} red fn-fb{/if}">帐号余额(￥)</th>
            <th class="w160 fn-tar{if $types == 3} red fn-fb{/if}">等待结算(￥)</th>
            <th class="w160 fn-tar{if $types == 4} red fn-fb{/if}">购物积分</th>
            <th class="w160">更新日期</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $vo}
        <tr>
            <td class="fn-tac"><a class="button button-mini" href="javascript:openwin('{:url('bank/bill',['uid' =>$vo.user_id])}')" title="账单"> <i class="iconfont icon-text_icon"></i>账单</a></td>
            <td><a href="javascript:openwin('{:url('user/review',['uid' => $vo.user_id])}')">{$vo['nickname']}</a></td>
            <td>{$vo.phone_uid}</td>
            <td class="fn-tar">￥{$vo.income_money|money}</td>
            <td class="fn-tar">￥{$vo.money|money}</td>
            <td class="fn-tar red">￥{$vo.tobo_paid|money}</td>
            <td class="fn-tar">{$vo.shop_money}</td>
            <td>{$vo->update_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
<div class="page">{$list|raw}</div>
<script type="text/javascript">
Do('base','layer','form','date',function () {
    $('#form').isForm({'types':1});
})
</script>